package cn.yitun.chat.yitunserverimbase.dao.room;

import cn.yitun.chat.yitunservercommonlib.crud.yitun.CrudDao;
import cn.yitun.chat.yitunservercommonlib.dataentity.dto.room.RoomChatItemDto;
import cn.yitun.chat.yitunservercommonlib.dataentity.po.room.RoomChatItemInfo;
import cn.yitun.chat.yitunservercommonlib.dataentity.vo.room.RoomChatItemVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 房间聊天项目表
 * @author chenyitun
 * @email chenyitun@163.com
 * @date 2020-05-27 14:43:51
 */
@Mapper
public interface RoomChatItemDao extends CrudDao<RoomChatItemDto, RoomChatItemInfo, RoomChatItemVo> {

	int absDel(Long id);

	int batchAbsDel(Long[] ids);

	/**
	 * 获取聊天条目
	 * @param text
	 * @return
	 */
	List<RoomChatItemVo> queryRoomChatItemList(@Param("text") String text);

	/**
	 * 获取聊天条目
	 * @param messageIds
	 * @return
	 */
	List<RoomChatItemVo> getRoomChatItemListByMessageIds(@Param("list") List<Long> messageIds);

	/**
	 * 获取聊天条目
	 * @param roomChatContentIds
	 * @return
	 */
	List<RoomChatItemVo> getRoomChatItemListByContentIds(@Param("list") List<Long> roomChatContentIds);

	/**
	 * 保存列表
	 * @param list
	 * @return
	 */
    int saveList(@Param("list") List<RoomChatItemDto> list);
}
